﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using RN.ERP.Web.BasicService;

namespace RN.ERP.Web.UserControl
{
    public partial class WebPsnQual : System.Web.UI.UserControl
    {
        BasicServiceClient client = new BasicServiceClient();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DDBind();
            }
        }
        protected void DDBind()
        {
            ////证书类型下拉绑定
            //var titletype = client.GetPsnQualTypesByType().ToArray();
            //this.PsnCertType.DataSource = titletype;
            //this.PsnCertType.DataValueField = "NID";
            //this.PsnCertType.DataTextField = "Name";
            //this.PsnCertType.DataBind();
            ////this.PsnCertType.SelectedIndexChanged += new System.EventHandler(this.PsnCertType_SelectedIndexChanged);
            //this.PsnCertType.Items.Insert(0, new ListItem("-请选择-", "-1"));
            ////专业下拉绑定
            //var specialty = client.GetPsnspecialtyByQualLType(0).ToArray();
            //this.PsnSpecialty.DataSource = specialty;
            //this.PsnSpecialty.DataValueField = "Code";
            //this.PsnSpecialty.DataTextField = "SpecialityTitle";
            //this.PsnSpecialty.DataBind();

        }
        protected void PsnCertType_SelectedIndexChanged(object sender, EventArgs e)
        {

            //string code = this.PsnCertType.SelectedValue;
            //var certlevel = client.GetPsnQualLevelByType(int.Parse(code));
            //this.PsnCertLevel.DataSource = certlevel;
            //this.PsnCertLevel.DataValueField = "NID";
            //this.PsnCertLevel.DataTextField = "Name";
            //this.PsnCertLevel.DataBind();
            //this.PsnCertLevel.Items.Insert(0, new ListItem("-请选择-", "-1"));
        }


    }
}